var express = require('express');
var router = express.Router();

var admin = {
    home : require('./home'),
    addSupervisor : require('./add_supervisor'),
    merchant : {
        add : require('./merchant/add'),
        list : require('./merchant/list'),
        price : require("./merchant/price")
    },
    addMerchantAdmin : require('./add_merchant_admin')
};

router.get('/home', admin.home);
router.get('/merchant/add', admin.merchant.add.GET);
router.get('/merchant/list', admin.merchant.list.GET);
router.get('/merchant/price', admin.merchant.price.GET);
// router.get('/MP_verify_BhCzKCxnF7nw4AhQ.txt', function(req,res){
    // res.send("BhCzKCxnF7nw4AhQ");
// });

// router.get('/MP_verify_8vDF2l164kRpiYeG.txt', function(req,res,next){
    // res.send('8vDF2l164kRpiYeG');
// });


router.post('/merchant/add', admin.merchant.add.POST);
router.post('/merchant/list', admin.merchant.list.POST);
router.post('/merchant/price', admin.merchant.price.POST);
router.post('/addSupervisor', admin.addSupervisor);
router.post('/addMerchantAdmin', admin.addMerchantAdmin);

module.exports = router;
